**********************************************************************************	
*** TABLE A9: Dynamic Effect of Hearings on IP Rate, with Agency Budget Authority.
**********************************************************************************
			
use "$DATALOC/AgencyLevel.dta", clear
eststo app_budget_1: reghdfe iprate agen_hear_all last_agen_hear agen_ba, a(agency FY, savefe)
	quietly estadd local fixedyear "Yes", replace
	quietly estadd local fixedagency "Yes", replace
	estadd ysumm, replace	
eststo app_budget_2: reghdfe iprate agen_hear_all last_agen_hear agen_dba, a(agency FY, savefe)
	quietly estadd local fixedyear "Yes", replace
	quietly estadd local fixedagency "Yes", replace
	estadd ysumm, replace	

* One panel, agency only (agency-level budget authority)
esttab app_budget_1 app_budget_2 using "$TABLELOC/TableA09.tex", ///
	prehead("\begin{table}[htbp]\centering \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} \caption{Dynamic Effect of Hearings on Improper Payment Rate, with Agency Budget Authority. Dependent variable is improper payment rate as a percent of all payments.}  \begin{tabular}{l*{3}{c}} \toprule") ///
	b(a2) fragment ///
	booktabs label se star(** 0.05 *** 0.01)s(fixedyear fixedagency N, label("Fiscal Year FE" "Agency FE" "Observations")) ///
	order(last_agen_hear agen_hear_all) keep(agen* last*) ///
	nomtitles ///
	mgroups("Agency-level", ///
				pattern(1 0) ///
				span prefix(\multicolumn{@span}{c}{) suffix(})) ///
	prefoot("\hline") ///
	postfoot("\bottomrule \multicolumn{3}{l}{\footnotesize Standard errors in parentheses.}\\ \multicolumn{3}{l}{\footnotesize \sym{**} \(p<0.05\), \sym{***} \(p<0.01\)}\\ \end{tabular}  \\ \label{tab:budget} \end{table}") replace
	
	
	
	
